// express

let express = require('express');

let app = express();

let webpack = require('webpack');

// webpack 中间件
let middle = require('webpack-dev-middleware');
// 1. 获取我们编写的 webpack 配置文件
let config = require('./webpack.config');

let compiler = webpack(config);

app.use(middle(compiler));

app.get('/api/user',(req,res)=>{
  res.json({name:'高泽文'});
});

app.listen(3000);
